/**
 * @ClassName 查询登录日志
 * @Author 杨沛琪
 * @Date 2021/11/4
 */
package com.pro.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

@Data
public class LoginRecord {
    private Integer id;
    private Integer userId;//用户id
    private String loginIp;//登录IP
    private String loginAddress;//登录地区
    private Integer loginState;//登录状态，2登录成功，3登陆失败
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String loginDate;//登陆时间
    private Integer loginType;//类型，2后台，3前台

    public LoginRecord(Integer id, Integer userId, String loginIp, String loginAddress, Integer loginState, String loginDate, Integer loginType) {
        this.id = id;
        this.userId = userId;
        this.loginIp = loginIp;
        this.loginAddress = loginAddress;
        this.loginState = loginState;
        this.loginDate = loginDate;
        this.loginType = loginType;
    }

    public LoginRecord() {
        super();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    public String getLoginAddress() {
        return loginAddress;
    }

    public void setLoginAddress(String loginAddress) {
        this.loginAddress = loginAddress;
    }

    public Integer getLoginState() {
        return loginState;
    }

    public void setLoginState(Integer loginState) {
        this.loginState = loginState;
    }

    public String getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(String loginDate) {
        this.loginDate = loginDate;
    }

    public Integer getLoginType() {
        return loginType;
    }

    public void setLoginType(Integer loginType) {
        this.loginType = loginType;
    }
}
